#import "Fabrica.h"

@implementation Fabrica

@synthesize id;
@synthesize nome;

-(NSString*) text {
    return nome;
}

-(NSDictionary*)toDictionary {
    return @{@"id":self.id, @"nome":self.nome};
}

+(id<SelectableModel>)fromDictionary:(NSDictionary *)dictionary {
    Fabrica* fabrica = [[Fabrica alloc] init];
    fabrica.id = [dictionary objectForKey:@"id"];
    fabrica.nome = [dictionary objectForKey:@"nome"];
    return fabrica;
}

@end
